import { Button } from "antd"
export default function TaskList({
    tasks,
    onChangeTask,
    onDeleteTask
  }) {
    return (
      <section className="contact-list">
        <ul>
          {tasks.map(contact =>
            <li key={contact.id}>
              <Button onClick={() => {
                onChangeTask(contact.id)
              }}>
                {contact.text}
              </Button>
              <Button onClick={() => {
                onDeleteTask(contact.id)
              }}>
                {contact.done.toString()}
              </Button>
            </li>
          )}
        </ul>
      </section>
    );
}
  